#version 430 core
layout(location = 0) out vec3 color;
in vec3 gs_color;
in vec2 gs_texcoord;

/* S型函数, log形式 */
void log_sigmoid(out float result, in float x, in float dx, in float coefficient)
{
    result = 1.0f/(1.0f+exp((x - dx) * coefficient));
}

void main()
{
	float texDistance=length(gs_texcoord);
	if(texDistance>1.0f) discard;
	gl_FragColor=vec4(gs_color, 1.0f);
    //gl_FragColor=vec4(0.5,0.0,1.0, alpha);
	// log_sigmoid(alpha, texDistance, 0.5f, 10000.0f);
}
